< previous page page_420 next page >

Page 420
Effective Menus
Another important part of form design is creating consistent, effective menus. Here are some important guidelines:
Follow standard Windows layout convention: File, Edit, View, and so on.
Group menu items logically and concisely.
Use separator bars to group related items in a drop-down menu.
Avoid redundant menu entries.
Avoid top-level menu bar items without drop-down menus.
Don't forget to use the ellipsis ( . . . ) to denote menu entries that activate dialog boxes.
Use standard shortcuts and hotkeys whenever possible.
Put frequently used menu items in a toolbar.
The steps involved in using the Menu Editor and creating a pop-up menu are discussed in Chapter 6, ''Giving More Control to the User: Menus and Toolbars."
sarrow.gifSee "Creating Pop-Up Menus," p. 122
Handling Multiple Instances of Your Application
Most Windows programs are started when users double-click a shortcut icon or menu. If users have 10 programs open, they can switch among them by using the taskbar or pressing Alt+Tab. However, many users like to double-click the shortcut icon again, even if the program is already open. Some shortcuts, such as the My Computer icon in Windows 95, simply bring up the existing window, whereas others launch a new instance of the program. For example, you can open multiple instances of Microsoft Word by selecting it from the Start menu, but double-clicking an associated document's icon uses an existing copy of Word. To further complicate matters, the Microsoft Office toolbar checks for an active copy of Word and shows it before launching a new one.
If you provide a desktop or toolbar shortcut to your application, users may expect the shortcut to activate an existing application rather than start a new one. This is especially true if users fill out a form and then minimize it to the taskbar. They may click the shortcut expecting the form to reappear, but if you have not coded for this occurrence, another instance of your application is launched, and the users see an empty form.
For certain applications, allowing multiple instances running at the same time may be desirable. However, if you do not design this capability into your application, errors will surely occur. For example, multiple copies of your application might try to write to the same database at the same time. Fortunately, preventing users from accidentally launching extra copies of your application is easy. The following lines of code in the Form_Load event or Sub Main do the job:
If App.PrevInstance = True Then
    MsgBox "Application already running!"
    End
End If

 
< previous page page_420 next page >